-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding user command integration tests to github CI workflow. #282
Merged
bdchatham
merged 19 commits into
Layr-Labs:madhur/slashing-allocations
from
bdchatham:chatham/uam-integration-tests
Dec 21, 2024
Merged
Adding user command integration tests to github CI workflow. #282
bdchatham
merged 19 commits into
Layr-Labs:madhur/slashing-allocations
from
bdchatham:chatham/uam-integration-tests
Dec 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shrimalmadhur
approved these changes
Dec 20, 2024
gpabst
approved these changes
Dec 20, 2024
bdchatham
merged commit Dec 21, 2024
435756e
into
Layr-Labs:madhur/slashing-allocations
7 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Adding user command integration tests to github CI workflow. These test suites use bats. This provides a simple testing framework for managing individual tests, output and assertions. This CI workflow runs against the Anvil environment.
Testing
These commands were tested throughout the week against EigenLayer slashing/uam contracts in personal, preprod and testnet environments.
Why bats & Other Options
Bats is a lean testing framework that allows us to dog food the entire e2e experience of our customers using the CLI.
It is fairly straightforward to run integration tests in Go, triggered as a CI task via a dockerfile, for example. While this would work well, and be nice for development, the concern is having gaps in the CX (although very small) and complexity working directly with command printed output. Again, all possible to do but chose this route for full dogfooding benefit.
This is not a one-way door. We can pivot to using Golang testing if bash scripting of the CLI binary is cumbersome unnecessary.
Standardization
I'd like to see us continue to expand on this testing iteratively for other commands and make it required to add tests like these for any net-new commands.
What Changed?